<template>
  <div class="info-content">
    <div class="page-main-title">
      车场配置
      <div class="actions" v-if="isPermmited('PARK:CONFIG:MANAGE:CONFIG:UPDATE')">
        <a href="javascript:;" @click="linkToEdit">编辑</a>
      </div>
    </div>
    <div class="info-main-content">
      <div class="feature-item" v-if="parkCloudDetailVo">
        <div class="top-title">
          满位限行
        </div>
        <!-- 已开启满位限行 -->
        <div class="feature-content m-content" v-if="parkCloudDetailVo.openFullLimit">
          <div class="parkingData-info">
            <div class="info-item">
              <div class="info-top-title">
                在场临时车/在场总车辆
              </div>
              <div class="data">{{ limitVo.currentTemp }}/{{ limitVo.total }}</div>
            </div>

            <div class="info-item">
              <div class="info-top-title">
                临时车剩余车位/总剩余车位
              </div>
              <div class="data">{{ limitVo.tempLeft }}/{{ limitVo.totalLeft }}</div>
            </div>
          </div>

          <el-form label-position="left" label-width="150px" class="featrue-form">
            <el-form-item label="总车位满位限行" v-if="limitVo.openFullLimit">
              {{ limitVo.fullLimitCount }}
            </el-form-item>
            <el-form-item label="临时车满位限行" v-if="limitVo.openNormalLimit">
              {{ limitVo.normalLimitCount }}
            </el-form-item>
            <el-form-item label="VIP车满位限行" v-if="limitVo.openVipLimit">
              {{ limitVo.vipLimitCount }}
            </el-form-item>
          </el-form>
        </div>

        <!-- 未开启满位限行 或 未配置 -->
        <div class="feature-content" v-if="!parkCloudDetailVo.openFullLimit">
          <div class="featrue-isClose"><i class="el-icon-warning"></i>未开启</div>
        </div>
      </div>

      <div class="feature-item" v-if="parkCloudDetailVo">
        <div class="top-title">
          模糊匹配
        </div>

        <div class="feature-content" v-if="parkCloudDetailVo.openFuzzyMatch">
          <div class="featrue-isOpen"><i class="el-icon-check"></i>已开启</div>
        </div>

        <div class="feature-content" v-if="!parkCloudDetailVo.openFuzzyMatch">
          <div class="featrue-isClose"><i class="el-icon-warning"></i>未开启</div>
        </div>
      </div>

      <div class="feature-item" v-if="parkCloudDetailVo" style="padding-bottom: 10px">
        <div class="top-title">
          车牌强制转换
        </div>

        <div class="feature-content" v-if="parkCloudDetailVo.carNoForceCovertFlag">
          <div class="featrue-isOpen"><i class="el-icon-check"></i>已开启</div>
        </div>

        <div class="feature-content" v-if="!parkCloudDetailVo.carNoForceCovertFlag">
          <div class="featrue-isClose"><i class="el-icon-warning"></i>未开启</div>
        </div>

        <div class="transform-license-plate-bd" v-if="parkCloudDetailVo.carNoForceCovertFlag">
          <div
            class="transform-item"
            v-for="(item, index) in parkCarNoForceCovertConfigVoList"
            v-show="(!isShowMore && index < 3) || isShowMore"
          >
            <div class="left-bd">正确车牌：{{ item.covertDestCarNo }}</div>
            <div class="mid-bd">相近车牌： {{ item.covertSrcCarNo.join(' / ') }}</div>
          </div>
        </div>
        <div
          class="show-bar"
          v-if="!isShowMore && parkCarNoForceCovertConfigVoList.length > 3"
          @click="isShowMore = true"
        >
          <i class="el-icon-arrow-down"></i>展开更多
        </div>
        <div
          class="hide-bar"
          v-else-if="isShowMore === true && parkCarNoForceCovertConfigVoList.length > 3"
          @click="isShowMore = false"
        >
          <i class="el-icon-arrow-up"></i>收起
        </div>
      </div>

      <div class="feature-item" v-if="parkCloudDetailVo">
        <div class="top-title">
          放行原因配置
        </div>

        <div
          class="feature-content"
          v-if="!parkCloudDetailVo.enterReleaseReasonStatus && !parkCloudDetailVo.leaveReleaseReasonStatus"
        >
          <div class="featrue-isClose"><i class="el-icon-warning"></i>未配置</div>
        </div>

        <div
          class="feature-content"
          v-if="
            (checkInReason && parkCloudDetailVo.enterReleaseReasonStatus) ||
              (checkOutReason && parkCloudDetailVo.leaveReleaseReasonStatus)
          "
        >
          <div class="reason-item" v-if="checkInReason && parkCloudDetailVo.enterReleaseReasonStatus">
            <div class="top-title">
              入口
            </div>
            <div class="reason-bd">
              <div class="reason-detail-item" v-for="(item, index) in checkInReason">
                <div class="title">原因{{ index + 1 }}:</div>
                <div class="bd">
                  {{ item.reasonContent }}
                </div>
              </div>
            </div>
          </div>

          <div class="reason-item" v-if="checkOutReason && parkCloudDetailVo.leaveReleaseReasonStatus">
            <div class="top-title">
              出口
            </div>
            <div class="reason-bd">
              <div class="reason-detail-item" v-for="(item, index) in checkOutReason">
                <div class="title">原因{{ index + 1 }}:</div>
                <div class="bd">
                  {{ item.reasonContent }}
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="feature-item" v-if="parkCloudDetailVo">
        <div class="top-title">
          离线放行设置
        </div>

        <div class="feature-content" v-if="parkCloudDetailVo.offlineReleaseModel == 0">
          <div class="featrue-isOpen"><i class="el-icon-check"></i>手动放行</div>
        </div>

        <div class="feature-content" v-if="parkCloudDetailVo.offlineReleaseModel == 1">
          <div class="featrue-isOpen"><i class="el-icon-check"></i>自动放行</div>
        </div>
      </div>

      <div class="feature-item">
        <div class="top-title">
          免费倒计时
        </div>
        <div class="feature-content">
          <div class="featrue-isOpen">
            <i class="el-icon-check"></i>免费时间剩余<span class="green-text">{{ remainFreeParkingTime }}分钟</span>
            ,进行计费倒计时提示
          </div>
        </div>
      </div>

      <div class="feature-item" v-if="parkCloudDetailVo && parkCloudDetailVo.parkingCarStatRange">
        <div class="top-title">
          在场车辆统计范围
        </div>
        <div class="feature-content">{{ parkCloudDetailVo.parkingCarStatRange }} 小时</div>
      </div>
    </div>
  </div>
</template>

<script>
import pageScript from './index.js';
export default pageScript;
</script>

<style lang="less" scoped>
@import './index.less';
</style>
